<template>
  <div class="Ctx_box" v-if="bctx_bool">
    <div class="box_gray">
      <div class="ctx_center">
        <div class="article_box">
          <div class="atitle">
            <label><slot name="bbstitle"></slot></label>
          </div>
          <div class="actx">
            <label><slot name="bbsctx"></slot></label>
          </div>
          <div class="afood">
            <footer>
              <slot name="bbsfooter"></slot>
            </footer>
          </div>
          <div class="ctxbg" :style="{opacity:load_op}" v-if="load_bool">
            <!--缺个背景图-->
            <div class="ctxinbg" :style="{opacity:black_bgop}" v-if="back_bgbool">
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
  export default{
    data(){
      return{
        bctx_bool:true,
        black_bgop:1,
        back_bgbool:true,
        loadtime:1300,
        load_bool:true,
        load_op:1
      }
    },
    components:{
    },
    mounted:function(){
      var _this=this;
      var time=window.setInterval(function () {
        _this.loadtime-=1;
        _this.black_bgop=_this.black_bgop*(_this.loadtime/1300);
        if(_this.loadtime<1000){
          _this.black_bgbool=false;
          _this.load_op=_this.load_op*((_this.loadtime+500)/1500);
          if(_this.loadtime<500){
            _this.load_bool=false;
            window.clearInterval(time);
          }
        }
      },1);
    }
  }
</script>
<style>
  .Ctx_box{
    font-size: 5px;
    top: 0px;
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 9999;
  }
  .box_gray{
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
  }
  .ctx_center{
    position: inherit;
    background-color: rgba(230,230,230,1);
    width: 900px;
    height: 600px;
    top: 50%;
    left: 50%;
    margin: -300px 0 0 -450px;
    border: 1px white solid;
    border-radius: 50px;
    text-align: -webkit-center;
  }
  .ctxbg{
    position: inherit;
    z-index: 9999;
    height: 550px;
    width:  800px;
    background-image: url("../assets/5C2717D23921.png");
    margin-top: -520px;
  }
  .ctxinbg{
    position: absolute;
    height: 600px;
    width:  900px;
    border-radius: 50px;
    margin-left: -50px;
    margin-top: -35px;
    background-color: black;
    z-index: 9999;
  }
  .article_box{
    position: inherit;
    /*background-color: #0D0D0D;*/
    width: 800px;
    height: 500px;
    top: 50%;
    left: 50%;
    margin: -250px 0 0 -400px;
  }
  .article_box .atitle{
    /*background-color: red;*/
    position: relative;
    width: 780px;
    height: 70px;
    text-align: left;
  }
  .article_box .atitle label{
    font-size: 30px;
    margin-top: -55px;
  }
  .article_box .actx{
    /*background-color: yellow;*/
    position: relative;
    border: 2px gray dotted;
    width: 780px;
    height: 395px;
    text-align: left;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .article_box .actx label{
    font-size: 20px;
    margin: 10px;
    text-indent: 40px;
  }
  .article_box .afood{
    /*background-color: green;*/
    position: relative;
    width: 780px;
    height: 40px;
    text-align: left;
  }
  .article_box .actx label{
    font-size: 20px;
    margin: 10px;
  }
  .article_box footer{
    float:right;
    margin-top: 30px;
    margin-right: 50px;
  }

</style>

